/**
 * @author : cww
 * @date : 2021/1/23 16:12
 */
public class OnCommand implements Command{
    private Light light;
    public OnCommand(Light light){
        this.light = light;
    }
    /**
     * 执行命令
     */
    @Override
    public void execute() {
        light.on();
    }

    /**
     * 撤消命令
     */
    @Override
    public void undo() {
        light.off();
    }
}
